<style type="text/css">
	a.btnDelete img{display:none}
</style>
<div class="box_type02">
	<h2 class="txt">컨텐츠관리</h2>
	<p class="icon"><a href="javascript:void(0);" class="icon_m04">매뉴얼</a></p>

	<div class="contCont">
	
		<ul class="c_box">
			<li class="left">
				<div id="contsMenu">
					<div class="addPlus">
					 <input type="text" id="" name="" class="ip" value="상위메뉴추가" /> 
                      <input type="button" id="add_folder" class="btn_search" title="검색" value="" /> 
					</div>

					<div id="demo" class="demo mt10" style="background:#fff"></div>
				
				</div>
			</li>
			<li class="right">
				<!--[s] 쓰기 -->
				<form name="frmReg" method="post" action="/contents/contentsForm/contents_html">
				<input type="hidden" name="id" value="<?=$id?>">
				<input type="hidden" name="dbjob" value="<?php echo $dbjob?>">
				<fieldset class="board_write">
					<legend>컨텐츠관리</legend>
					<table cellspacing="0" summary="컨텐츠관리">
						<caption>컨텐츠관리</caption>
						<tr>
							<th scope="row" width="100"><p class="point">기능선택</p></th>
							<td>
								<div>
									
									<ul class="w20 c_box">
									<?php
										foreach($this->config->item('ch_contents') as $key => $value){
											$checked = ($key == 'HTML') ? 'checked' : '';
											echo "<li><input type=\"radio\" id=\"types{$key}\" name=\"page_type\" class=\"ip_c\" value=\"{$key}\" {$checked} /><label for=\"types{$key}\" class=\"txt_type01\">{$value}</label></li>\n";
										}
									?>
									<!--</ul>  -->
								</div>
							</td>
						</tr>
						<tr>
							<th scope="row"><p class="point">제목</p></th>
							<td>
								<div><input type="text" id="" name="title" class="ip_i" style="width:481px;" value="<?php echo $title?>"/></div>
							</td>
						</tr>
						<tr>
							<th scope="row"><p class="point">키워드</p></th>
							<td>
								<div><input type="text" id="" name="keyword" class="ip_i" style="width:481px;" value="<?php echo $keyword?>" /></div>
							</td>
						</tr>
						<tr>
							<th scope="row"><p class="point">설명</p></th>
							<td>
								<div><input type="text" id="" name="description" class="ip_i" style="width:481px;" value="<?php echo $description?>" /></div>
							</td>
						</tr>
						<tr>
							<td class="noline" colspan="2">
								<div id="contents-optional">
									<textarea name="content" rows="" cols="" class="ip_t"><?php echo $content?></textarea>
								</div>
							</td>
						</tr>
					</table>
				</fieldset>
				</form>
				<!--[e] 쓰기 -->
			</li>
		</ul>

	</div>

	<!-- [s] 버튼 -->
	<ul class="botton_box mt30">
		<li class="center">
			<a href="javascript:frmValid();" class="btnAdd"><img src="/theme/<?=$_theme?>/images/common/btn_ok.gif" alt="확인" /></a>
			<!-- <a href="javascript:void(0);"><img src="/theme/<?=$_theme?>/images/common/btn_modify.gif" alt="수정" /></a> -->
			<a href="javascript:frmDelete();" class="btnDelete"><img src="/theme/<?=$_theme?>/images/common/btn_delete.gif" alt="삭제" /></a>
			<!-- <a href="javascript:void(0);"><img src="/theme/<?=$_theme?>/images/common/btn_cancel.gif" alt="취소" /></a> -->
		</li>
	</ul>
	<!-- [e] 버튼 -->

	<!--[s] Tip -->
	<dl id="tip" class="mt30">
		<dt>Tip</dt>
		<dd>인터넷익스플로러의 '호환성보기' 기능을 사용중인 접속자에게 자동으로 최신버전 기준으로 사이트를 출력하도록 처리합니다.</dd>
		<dd>코딩방식에 따라 특정 버전의 브라우저에서 사이트가 깨질수 있으니, 충분한 테스트 후 기능을 설정해 주시기 바랍니다.</dd>
	</dl>
	<!--[e] Tip -->
</div>
<script type="text/javascript" src="/common/js/contents.js"></script>
<script type="text/javascript">
//<![CDATA[
function frmValid(){
	with(document.frmReg){
		submit();
	}
}
function frmDelete(){
	if(!confirm('삭제 하시겠습니까?'))return;
	with(document.frmReg){
		dbjob.value = 'd';
		submit();
	}	 
}

$(function () {
	if(!$("[name=id]").val()) $("[name=frmReg]").attr("disabled",true);
});
//]]>							
</script>